In a conventional mobile network, data communication between user equipments (UE) needs to be implemented by using a core network. Even if two UEs are very close, data between the two UEs still needs to be transmitted by using a core network. In this case, a relatively great network transmission bandwidth is required, and transmission efficiency is relatively low.
To enable UEs that are relatively close to directly transmit data to each other without using a core network, the user equipments need to be capable of discovering each other. That is, user equipment needs to be capable of accurately estimating a distance to another user equipment.
The existing 3rd Generation Partnership Project (3GPP) provides the following technical solution for mutual discovery between user equipments.
First user equipment generates a broadcast code word, and broadcasts the broadcast code word, where the broadcast code word includes location information of the first user equipment, and the location information may be Global Positioning System (GPS) coordinates. Second user equipment receives and parses the broadcast code word to obtain the location information of the first user equipment, and performs distance estimation according to location information of the second user equipment.
In the foregoing solution, the first user equipment broadcasts the broadcast code word that includes the location information. This results in that the location information of the first user equipment is long exposed in an air interface, and may cause user privacy leakage.